feat(eap): Calculate performance scores for V2 spans#5947
feat(eap): Calculate performance scores for V2 spans#5947loewenheim wants to merge 15 commits intomasterfrom
Conversation
|
|
||
| measurements.insert( | ||
| measurements.insert_measurement( | ||
| format!("score.ratio.{}", component.measurement), |
There was a problem hiding this comment.
Here we would ideally use something more principled than just stitching an attribute together manually. See #5940 for a potential solution.
Dav1dde
left a comment
There was a problem hiding this comment.
Didn't think it would fit that easily, nice.
For:
ctx.project_info.config().performance_score.as_ref(),I had this comment which github doesn't let me save:
I did move a bunch of these to the top and gave it names, so all the normalize calls are on a single line. I liked the readability.
|
|
||
| measurements.insert( | ||
| measurements.insert_measurement( | ||
| format!("score.ratio.{}", component.measurement), |
|
@loewenheim for tests, it would be great if you could update the |
Sure, will do. |
08b56a2 to
0da1d67
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9a7a7bf. Configure here.

This slightly generalizes
normalize_performance_scoreso it can be applied to V2 spans (essentially all that needs to be done is to make it accessAttributesin addition toMeasurements).As the included tests demonstrate, this works seamlessly, with the minor wrinkle that the conditions for performance profiles need to be adjusted so that they match the browser name in either
event.context.browser.name(the status quo, for legacy events/spans) orspan.attributes.browser.name.value(for V2 spans). This should be simple enough to do in Sentry and is, in my opinion, vastly preferable to creating a compatibility shim in Relay itself.TODO:
ref: INGEST-844.